"""
__author__ = 'heyanmin'
__time__ = '2021/4/18 2:47 下午'
"""
from selenium.webdriver.common.by import By

from web_po_wechat.page.add_member import AddMemberPage
from web_po_wechat.page.base_page import BasePage
from web_po_wechat.page.contact import ContactPage
from web_po_wechat.page.import_contact import ImportContactPage


class MainPage(BasePage):
    # 首页——>跳转通讯录 / 添加成员 / 导入通讯录

    # 添加人员按钮
    __add_member_btn = (By.CSS_SELECTOR, ".ww_indexImg_AddMember")
    # 通信录按钮
    __add_department_btn = (By.CSS_SELECTOR,'.menu_contacts')


    def goto_contact(self):
        # 跳转到通讯录
        self.find(self.__add_department_btn).click()
        return ContactPage(self.driver)
    def goto_add_member(self):
        """
        跳转到添加成员页面
        :return:
        """
        self.find(self.__add_member_btn).click()
        return AddMemberPage(self.driver)

    def goto_import_contact(self):
        # 跳转到【导入通讯录页面】
        return ImportContactPage()